

public class ExOnSorting {

	public static void main(String[] args) {
		
	 int[] arr	={10,50,5,40,30,20};
	 for(int i=0; i<arr.length; i++){
		 for(int j=0;j<arr.length; j++){
			 if(arr[i] < arr[j]){
				 int temp = arr[i];
				 arr[i] = arr[j];
				 arr[j] = temp;
			 }
		 }
	 }
	 for(int k=0; k<arr.length; k++){
		 System.out.println(arr[k]);
	 }
	}
}
